function closeOverFunctionArg(x) = new Dynamic { value = x }

res1 = closeOverFunctionArg(4).value

hidden closeOverLambdaArg = (x) -> new Dynamic { value = x }

res2 = closeOverLambdaArg.apply(4).value

function closeOverFunctionAndLambdaArg(x) = (y) -> new Dynamic { value = y + x }

res3 = closeOverFunctionAndLambdaArg(4).apply(5).value

hidden closeOverTwoLambdaArgs = (x) -> (y) -> new Dynamic { value = y + x }

res4 = closeOverTwoLambdaArgs.apply(4).apply(5).value
